#ifndef WORLD_H
#define WORLD_H

#include "DinamicAnimation.h"
#include "Indicator.h"
#include "Engine.h"
#include <vector>
#include <string>
using namespace std;

class World{
private:
    static const int map_w;
    static const int map_h;
    static int lvl_max;
    int** map;
    int lvl;
    bool lvl_up;
    bool loose;
    bool pause;
    bool menu;
    bool go;
    bool preview;
    bool discharge;
    Engine* eng;
    vector<StaticAnimation> wires;
    DinamicAnimation* robot;
    Indicator* indicator;
    StaticAnimation* girl;

    void collision(int dig_x, int dig_y);
    void checkWires();
    bool isGirlFound();
    void checkInput(float time);
    void play(float time);
    void checkPause();
    string intToString(int num);
    void clearWindow();
    bool nextFramePreview();

public:
    World(RenderWindow *wnd);
    void init(string level);
    void scenario(float time);
    void render();
    bool isWindowOpen();
};
#endif // WORLD_H
